<template>
  <SettingBox title="功能">
    <SettingBoxItem label="内容" tip="内容">
      <el-input placeholder="请输入文本内容" v-model="config.slot"></el-input>
    </SettingBoxItem>
    <SettingBoxItem label="标签" tip="渲染标签">
      <el-input placeholder="请输入标签" v-model="config.tag"></el-input>
    </SettingBoxItem>
    <SettingBoxItem label="是否显示省略号" tip="是否显示省略号">
      <el-switch v-model="config.truncated"></el-switch>
    </SettingBoxItem>
    <SettingBoxItem label="文本类型" tip="文本类型">
      <el-select placeholder="请选择文本类型" v-model="config.type">
        <el-option label="主文本" value="primary"></el-option>
        <el-option label="成功文本" value="success"></el-option>
        <el-option label="警告文本" value="warning"></el-option>
        <el-option label="危险文本" value="danger"></el-option>
        <el-option label="信息文本" value="info"></el-option>
      </el-select>
    </SettingBoxItem>
    <SettingBoxItem label="尺寸" tip="设置文本大小">
      <el-radio-group v-model="config.size">
        <el-radio-button label="大" value="large" />
        <el-radio-button label="中" value="default" />
        <el-radio-button label="小" value="small" />
      </el-radio-group>
    </SettingBoxItem>
  </SettingBox>
</template>

<script lang="ts" setup>
defineOptions({
  name: "TextConfig",
});

defineProps({
  config: {
    type: Object,
    required: true,
  },
});
</script>

<style scoped lang="scss"></style>
